home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.tree;
-
- import java.util.NoSuchElementException;
-
- final class DefaultMutableTreeNode$BreadthFirstEnumeration$Queue {
- // $FF: synthetic field
- private final DefaultMutableTreeNode.BreadthFirstEnumeration this$1;
- DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode head;
- DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode tail;
-
- DefaultMutableTreeNode$BreadthFirstEnumeration$Queue(DefaultMutableTreeNode.BreadthFirstEnumeration var1) {
- this.this$1 = var1;
- }
-
- public Object dequeue() {
- if (this.head == null) {
- throw new NoSuchElementException("No more elements");
- } else {
- Object var1 = this.head.object;
- DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode var2 = this.head;
- this.head = this.head.next;
- if (this.head == null) {
- this.tail = null;
- } else {
- var2.next = null;
- }
-
- return var1;
- }
- }
-
- public void enqueue(Object var1) {
- if (this.head == null) {
- this.head = this.tail = new DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode(this, var1, (DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode)null);
- } else {
- this.tail.next = new DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode(this, var1, (DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode)null);
- this.tail = this.tail.next;
- }
-
- }
-
- public Object firstObject() {
- if (this.head == null) {
- throw new NoSuchElementException("No more elements");
- } else {
- return this.head.object;
- }
- }
-
- public boolean isEmpty() {
- return this.head == null;
- }
- }
-